<?php 
?>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/fileinput/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
<script src="http://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="../js/fileinput.min.js"></script>
<!-- bootstrap.js below is only needed if you wish to the feature of viewing details
     of text file preview via modal dialog -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
<!-- optionally if you need translation for your language then include
    locale file as mentioned below -->
<script src="../js/locales/zh.js"></script>

<div class="container kv-main">
	<form enctype="multipart/form-data">
		<label>添加<?php echo $product_id['product_name'] ?>图片</label>
		<input type="file" class="file"id="img_url1" name="image_data[]"accept="image/*" multiple>
                提示：请使用分辨率800*800以上的正方形产品图，以便商品页展示效果最佳。
	</form>
</div>
<script>
	$("#img_url1").fileinput({
		language: 'zh',
		uploadUrl: "upload?product_id=<?php echo $product_id['product_id'] ?>", //上传后台操作的方法
		uploadAsync: false, //设置上传同步异步 此为同步
		maxFileSize: 20480,
		allowedFileExtensions: ['jpg', 'png'] //限制上传文件后缀
	});//初始化 后 上传插件的样子

</script>
